package com.game.tiledmap;

import com.game.framwork.gamesupport.GameSprite;
import com.game.framwork.itf.Graphics;
import com.game.object.AnimateObject;
import com.game_ltdd.Resrouce;

public class TiledDestroyEffect extends AnimateObject{
	public TiledDestroyEffect() {
		init();
	}
	
	private void init() {
		this.objectImage = Resrouce.mapObjectExplore;
		GameSprite pAnim;
		pAnim = new GameSprite(objectImage);
		pAnim.createAnimation("Explore", 4, 7, 4, 1.0f / 4.0f);
		loadSprite(objectImage, 8, 8, 50, 55, pAnim);
		changeAnimation("Explore");
	}
	
	@Override
	public void updateInternal(float deltaTime) {	
		if (getCurrAnimation().currFrame == getCurrAnimation().endFrame) {
			return;
		}
		super.updateInternal(deltaTime);
	}

	@Override
	public void paintInternal(Graphics g) {
		if (getCurrAnimation().currFrame == getCurrAnimation().endFrame) {
			return;
		}
        super.paintInternal(g);
    }
}
